package com.swim.entity;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToOne;
import javax.persistence.Table;

@Entity
@Table(name="Feedback")
public class Feedback implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -8870015473429167178L;
	
	@Id
	@OneToOne(mappedBy="idFeedback")
	//@Column(name="id" , nullable=false)
	@GeneratedValue
	private int id;
	
	@Column(name="description", nullable=false)
	private String description;
	
	@Column(name="rating", nullable=false)
	private int rating;
	
	
	public Feedback() {}
	
	public Feedback(String description, int rating){
		setDescription(description);
		setRating(rating);
	}

	/**
	 * @return the id
	 */
	public int getId() {
		return id;
	}
	
	/**
	 * @param id the id to set
	 */
	public void setId(int id) {
		this.id = id;
	}

	/**
	 * @return the description
	 */
	public String getDescription() {
		return description;
	}

	/**
	 * @param description the description of the Feedback to set
	 */
	public void setDescription(String description) {
		this.description = description;
	}

	/**
	 * @return the rating
	 */
	public int getRating() {
		return rating;
	}

	/**
	 * @param rating the rating of the Feedback to set
	 */
	public void setRating(int rating) {
		this.rating = rating;
	}

}
